﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Linq;
public partial class Shared_ControlFeedbacks : System.Web.UI.UserControl
{
    ShopDataContext ds = new ShopDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        txtEmail.Text = "";
        txtMessage.Text = "";
        txtName.Text = "";
        txtTitle.Text = "";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Feedback f = new Feedback();
        f.fActive = true;
        f.fEmail = txtEmail.Text;
        f.fFullName = txtName.Text;
        f.fMessage = txtMessage.Text;
        ds.Feedbacks.InsertOnSubmit(f);
        ds.SubmitChanges();
        lblMessage.Text = "successful";
        txtEmail.Text = "";
        txtMessage.Text = "";
        txtName.Text = "";
        txtTitle.Text = "";
    }
}